package com.itjavas.cslp2.service.impl;

import com.itjavas.cslp2.mapper.NoticeMapper;
import com.itjavas.cslp2.pojo.entity.Notice;
import com.itjavas.cslp2.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@Service
public class NoticeServiceImpl implements NoticeService {
    @Autowired
    public NoticeMapper noticeMapper;
    //创建公告
    public ResponseEntity<Boolean> createNotice(Notice notice){
        //返回true
            return ResponseEntity.ok(noticeMapper.createNotice(notice));
        }


    //编辑公告
    public ResponseEntity<Boolean> editNotice(Notice notice){
        return ResponseEntity.ok(noticeMapper.editNotice(notice));
    }
}
